package com.bang.study.day07.impl;

import com.bang.study.day07.AVLTree;
import com.bang.study.day07.Set;

/**
 * @Auther: Bang
 * @Date: 2019/9/18 0018 17:37
 * @Description:
 */
public class AVLSet<E extends Comparable<E>> implements Set<E> {


    private AVLTree<E, Object> avl;

    @Override
    public void add(E e) {
        avl.add(e, null);
    }

    @Override
    public boolean contains(E e) {
        return avl.contains(e);
    }

    @Override
    public void remove(E e) {
        avl.remove(e);
    }

    @Override
    public int getSize() {
        return avl.getSize();
    }

    @Override
    public boolean isEmpty() {
        return avl.isEmpty();
    }
}
